package com.bolt.report.definition;

public enum ApiMethod {

    GET(0),

    POST(1);

    Integer code;

    ApiMethod(Integer code) {
        this.code = code;
    }

    public static ApiMethod toType(Integer code) {
        for (ApiMethod typeEnum : ApiMethod.values()) {
            if (typeEnum.code.equals(code)) {
                return typeEnum;
            }
        }
        return null;
    }

}